const {
  override, fixBabelImports, addBabelPlugins,
} = require('customize-cra');
const path = require('path');
const paths = require('react-scripts/config/paths');

paths.appBuild = path.join(path.dirname(paths.appBuild), 'dist');

module.exports = override(
  fixBabelImports('import', {
    libraryName: 'antd-mobile',
    style: 'css',
  }),
  addBabelPlugins([
    'babel-plugin-styled-components']),
  // 默认路径设置
  // addWebpackAlias({ '@': path.resolve(__dirname, './src') }),
);
